import request from '@/router/axios'

//物料类型
export const getTree = (params) => {
  return request({
    url: '/api/materialgroup/getTree',
    method: 'get',
    params
  })
}

//物料组列表
export const getMaterialgroupList = (params) => {
  return request({
    url: '/api/materialgroup/list',
    method: 'get',
    params: {
      ...params
    }
  })
}

//根据物料类型和物料组获取物料下拉选
export const materialList = (params) => {
  return request({
    url: '/api/prdinfo/materialByTypeAndGroup',
    method: 'get',
    params: {
      ...params
    }
  })
}
